JavaScript

listObj.listIsDirty Method

Syntax

listObj.listIsDirty();

Returns

resultboolean

Returns true if the List is dirty. If the List is not dirty or does not have a Detail View, returns false.

Description

Returns whether or not the List has unsynchronized edits (is dirty.)

Discussion

Returns true if the List is dirty (has unsynchronized edits.) If the List does not have a Detail View, listIsDirty will always return false.

A typical use case for this method is to test if the List is dirty before doing a refresh of the data (before using the {dialog.object}.refreshListData() method.)

Example

var listObj = {dialog.object}.getControl('MYLIST1');

if (listObj) {
    var flag = listObj.listIsDirty();
    if(flag) { 
            alert('You must first sync your edits before you can refresh the List');
    } else { 
            {dialog.object}.refreshListData('MYLIST');
    }
}